<?php

declare(strict_types=1);

namespace app\admin\validate;

use think\Validate;

class Admin extends Validate
{
     /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...].
     *
     * @var array
     */
    protected $rule = [
        'account' => 'require|min:6|chsDash',
        'password' => 'require|min:6',
        'name' => 'require|chs|min:2',
        'tel' => 'require|mobile',
        'email' => 'require|email',
        'sort' => 'require|number|gt:0',
        'page' => 'require|number|gt:0',
        'limit' => 'require|number|gt:5',
    ];
    protected $scene = [
        'getAdminListPage' => ['page', 'limit'],
    ];
}